//
//  GHNavVC.swift
//  hearTheWorld
//
//  Created by Guanghui Liao on 3/16/18.
//  Copyright © 2018 liaoworking. All rights reserved.
//

import UIKit

class GHNavVC: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()
        configNavBar()
    }

    func configNavBar() {
//        navigationBar.setBackgroundImage(#imageLiteral(resourceName: "htwNavBar"), for: .default)
//        navigationBar.tintColor = UIColor.white;
        navigationBar.setTitleFont(UIFont.systemFont(ofSize: 20), color: UIColor.black)
    }
    
//    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
//
//        if (self.childViewControllers.count > 0) {
//            let backImage = UIImageView(frame: CGRect(x: 0, y: 0, width: 40, height: 40))
//            backImage.backgroundColor = UIColor.red
//            let backItem = UIBarButtonItem(customView: backImage)
//            viewController.navigationItem.leftBarButtonItem = UIBarButtonItem(image: backImage, style: <#T##UIBarButtonItemStyle#>, target: <#T##Any?#>, action: <#T##Selector?#>)
//        }
//
//        super.pushViewController(viewController, animated: animated)
//    }
    
    
    
    func fackPopBack() {
        self.popViewController(animated: true)
    }
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
